<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %>
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>划扣记录</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
<div class="Wrapper">
<div class="Wrapper">
	<div id="pageInTab" class="pageInTab">
		<div tabid="tabA" title="划扣记录查询" lselected="true">
            <form id="formSet1">
            	<div class="fieldset1 tabel_col clearFix">
            		<div class="caption">
                        <span class="title">划扣记录查询</span>
                    </div>
                    <div class="fieldBox col_33">
	                    <div class="label">客户名称</div>
	                    <div class="field">
	                    	<span name="cstNm" id="cstNm">${cstNm}</span>
	                    	<input name="prjId" id="prjId" type="hidden" value="${prjId }">
	                    </div>
	                </div>
					<div class="fieldBox col_50">
						<div class="label">合同号</div>
						<div class="field">
							<span name="lsCntNo" id="lsCntNo">${lsCntNo}</span>
						</div>
					</div>
            	</div>
            	<div class="sqPanel">
	                <div class="sqPanel_body">
	                    <div id="ligergrid_A1" class="sq-grid"></div>
	                </div>
	            </div>
                
            </form>
        </div>
	</div>
</div>
</div>


<script type="text/javascript">
var withholdRecord ;

$(function () {
	initWithholdRecordGrid();
});



//初始化额度变更历史列表
function initWithholdRecordGrid() {
    var prjId = $("#prjId").val();
    if(!prjId){
        return; //验证不通过，不执行以下代码
    }
	//格式化时间
	function renderDate(rowdata, index, value){
		var dateStr = "";
		if(null != value){
			var date = new Date(value);
			dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
		}
		return dateStr;
	}

	$("#ligergrid_A1").ligerGrid({
        usePager: false,
        url: '<%=path%>/project/prjprdpayschm/getWithholdRecord.do?prjId=' +prjId,
        method : 'get',
        columns: [
			{ display: '处理时间', name: 'payApplyDt', minWidth: 140, render:renderDate},
			{ display: '还款时间', name: 'payDt', minWidth: 140, render:renderDate},
			{ display: '还款金额', name: 'payAmt', minWidth: 140},
			{ display: '银行卡号', name: 'bankAccNo', minWidth: 140},
			{ display: '还款状态', name: 'payStsCd', minWidth: 100,
				render: function(rowdata, rowindex, value){
					if(rowdata.payStsCd == 1){
						return "还款处理中" ;
					}else if(rowdata.payStsCd == 2){
						return "还款成功";
					}else if(rowdata.payStsCd == 3){
						return "还款失败";
					}else{
						return "";
					}
				}
			},
            { display: '失败原因', name: 'failDesc', minWidth: 140},
        ],
        pageSize:10,
        root:'rows',
        record:'total',
        hideLoadButton : true,
        width: '100%',
        isScroll: false,
        //checkbox:true,
        rownumbers:true,
        onAfterShowData: function() {
            SetIframe_height ();
        }
    });

	withholdRecord = liger.get("ligergrid_A1");
};




</script>



</body>
</html>
